package util;

import java.util.Date;

import javax.swing.JOptionPane;

import db.EntityWrapper;
import db.entity.Activitylog;
import db.entity.ActivitylogPK;


public class Activity {
	
	public static void log(String action, String userID, String comment){
		
		Activitylog activity = new Activitylog();
		ActivitylogPK activityPk = new ActivitylogPK();
		
		activityPk.setAction(action);
		activityPk.setTime(new Date());
		
		activity.setComment(comment);
		activity.setUserID(userID);
		activity.setId(activityPk);
		
		EntityWrapper<Activitylog> db = new EntityWrapper<Activitylog>( );
	    db.add(activity);
	    db.commit();
		
	}
	

}
